import javax.swing.*;
import java.awt.*;

// Press Shift twice to open the Search Everywhere dialog and type `show whitespaces`,
// then press Enter. You can now see whitespace characters in your code.
public class Main {
    public static void main(String[] args) {
        JFrame frame = new JFrame("百度一下，你就知道");
        frame.setSize(600, 250);
        frame.getContentPane().setBackground(Color.white);
        frame.setLayout(null);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);


        JLabel label = new JLabel();
        label.setIcon(new ImageIcon("timthumb.jpg"));
        label.setBounds(200, 0, 200, 100);
        frame.add(label);

        JTextField textField=new JTextField();
        textField.setBounds(50,150,400,45);
        frame.add(textField);

        JButton button=new JButton("百度一下");
        button.setBounds(450,150,100,45);
        button.addActionListener(e -> {
            JOptionPane.showMessageDialog(null,textField.getText(),"提示",JOptionPane.INFORMATION_MESSAGE);
        });
        frame.add(button);

        frame.setVisible(true);
    }

}